package com.yhb.channel.dao.Scalable;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ScalableChannelBoundRelationshipMapper {
    int insert(
            @Param("record") ScalableChannelBoundRelationshipRecord record,
            @Param("channelType") String channelType
    );

    String selectBillingCardIdByUserId(
            @Param("userId") String userId,
            @Param("channelType") String channelType
    );

    ScalableChannelBoundRelationshipRecord getBillingCardRecordByUserId(
            @Param("userId") String userId,
            @Param("channelType") String channelType
    );

    ScalableChannelBoundRelationshipRecord getRecordByCardId(
            @Param("cardId") String cardId,
            @Param("channelType") String channelType
    );

    int updateByUserId(
            @Param("record") ScalableChannelBoundRelationshipRecord record,
            @Param("channelType") String channelType
    );

    int updateByCardId(
            @Param("record") ScalableChannelBoundRelationshipRecord record,
            @Param("channelType") String channelType
    );

    List<ScalableChannelBoundRelationshipRecord> getAllRecordByUserId(
            @Param("userId") String userId,
            @Param("channelType") String channelType
    );
}
